package com.listen.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;

import com.listen.service.AnguanContinueService;
import com.listen.service.AnguanService;
import com.listen.vo.ClassParmsVO;

@Controller
public class ListenController {
	
	List<String> msgList = null;
	@Autowired
	private AnguanService anguanService = null;
	
	@Autowired
	private AnguanContinueService anguanContinueService = null;

	/**
	 * 安管初培
	 * 
	 * */
	@RequestMapping("/anGuan")
	public String anGuan(ModelMap map,ClassParmsVO vo){
		List<String> msgList = null;
		if(vo != null){
			msgList = anguanService.updateAnguanClassStatus(vo);
		}else{
			map.put("msg", "参数错误");
		}
		map.put("page", "0");
		map.put("msgList", msgList);
		return "result";
	}
	
	/**
	 * 安管延期
	 * */
	@RequestMapping("/anGuanContinue")
	public String anGuanContinue(ModelMap map,ClassParmsVO vo){
		List<String> msgList = null;
		if(vo != null){
			msgList = anguanService.updateAnguanClassStatus(vo);
		}else{
			map.put("msg", "参数错误");
		}
		map.put("page", "0");
		map.put("msgList", msgList);
		return "result";
	}
	
}
